﻿<?php
header("Content-type:text/html;charset=utf-8");
?>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>功能设置界面-过客</title>
<link rel="shortcut icon" href="icon.png"/>
<link rel="bookmark" href="icon.png"/>
<link rel='stylesheet' type='text/css' href='css.css'>
<link rel="stylesheet" type="text/css" href="css/register.css"/>
</head>
<body>
<?php
date_default_timezone_set('PRC');
require 'connect.php';
$qid=$_GET['qid'];
$act=$_GET['action'];
$mysql = mysql_query("SELECT * FROM qqlist WHERE qid='$qid'");
$sql= mysql_fetch_array($mysql);
$user=$sql['myqq'];
$qq=$sql['qq'];
$myusersql = mysql_query("SELECT * FROM user WHERE user='$user'");
$usersql= mysql_fetch_array($myusersql);
$vip=$usersql['vip'];
$peie=$usersql['peie'];
if($vip==1)
{
$precs=1;
}
if($vip==2)
{
$precs=2;
}
if($vip==3)
{
$precs=3;
}
$kycs=$peie*$precs;

if($_COOKIE["SHANIUUSER"]!=$sql['myqq'])
{
echo '<div class="signup_container"><h1 class="signup_title">非法闯入！</h1><br>小伙子！你想干嘛？这不是你的QQ！<br><br><center><a href="./user.php">返回用户中心</a></center></div>';

exit();
}
//如果是非vip，则提示非vip
if($vip<=0)
{
echo '<div class="signup_container"><h1 class="signup_title">非VIP用户！</h1><br>非常抱歉，你不是VIP用户，不能使用当前系统<br><br><center><a href="set.php?qid='.$qid.'">返回设置中心</a></center></div>';
exit();
}
//如果接到的是秒更新sid
if($act=='zdsid')
{
echo '<div class="signup_container">
<h1 class="signup_title">自动更新sid设置</h1>
<br>'.$sql['qq'].'自更sid界面
<div id="signup_forms" class="signup_forms clearfix">
<form class="signup_form_form" action="edit.php" method="get" >
<input type="hidden" name="qid" value="'.$qid.'">
<select name="changezdsid" style="width:260px">
<option value="1">关闭更新</option>
<option value="2">开启更新</option>
</select>
</div>
<div class="login-btn-set"><div class="rem">同意规定</div> <input type="submit"  value=" " class="login-btn3">
</div></form>
<center><a href="set.php?qid='.$qid.'">返回设置中心</a></center>
</div>';
}
//自动更新sid设置选项
if($_GET[changezdsid])
{
$changezdsid=$_GET['changezdsid'];
$xiugai_sql="update qqlist set zdsid='$changezdsid' where qq=$qq";
if(mysql_query($xiugai_sql)){
echo '<div class="signup_container"><h1 class="signup_title">自更sid开关</h1><br>自更sid修改成功<br><br><center><a href="set.php?qid='.$qid.'">返回设置中心</a></center></div>';
exit();
}else{
echo '<div class="signup_container"><h1 class="signup_title">自更sid开关</h1><br>自更sid修改失败，请稍后重试<br><br><center><a href="set.php?qid='.$qid.'">返回设置中心</a></center></div>';
exit();
}
}
//如果接到的是秒赞
if($act=='mz')
{
echo '<div class="signup_container">
<h1 class="signup_title">秒赞设置</h1>
<br>'.$sql['qq'].'秒赞设置界面
<div id="signup_forms" class="signup_forms clearfix">
<form class="signup_form_form" action="edit.php" method="get" >
<input type="hidden" name="qid" value="'.$qid.'">
<select name="changemz" style="width:260px">
<option value="fw1">关闭秒赞</option>
<option value="fw2">开启3G赞</option>
<option value="fw3">开启触屏赞</option>
<option value="fw4">开启PC赞</option>
</select>
</div>
<div class="login-btn-set"><div class="rem">同意规定</div> <input type="submit"  value=" " class="login-btn3">
</div></form>
<center><a href="set.php?qid='.$qid.'">返回设置中心</a></center>
</div>';
}
//秒赞设置选项
if($_GET[changemz])
{
$changemz=$_GET['changemz'];
$xiugai_sql="update qqlist set fwq='$changemz' where qq=$qq";
if(mysql_query($xiugai_sql)){
echo '<div class="signup_container"><h1 class="signup_title">修改秒赞开关</h1><br>秒赞修改成功<br><br><center><a href="set.php?qid='.$qid.'">返回设置中心</a></center></div>';
exit();
}else{
echo '<div class="signup_container"><h1 class="signup_title">修改评论内容</h1><br>秒赞修改失败，请稍后重试<br><br><center><a href="set.php?qid='.$qid.'">返回设置中心</a></center></div>';
exit();
}
}
//秒评选择部分
if($act=='pl')
{
echo '<div class="signup_container">
<h1 class="signup_title">秒评设置</h1>
<br>'.$sql['qq'].'秒评设置界面
<div id="signup_forms" class="signup_forms clearfix">
<form class="signup_form_form" action="edit.php" method="get" >
<input type="hidden" name="qid" value="'.$qid.'">
<select name="changepl" style="width:260px">
<option value="1">关闭秒评</option>
<option value="2">3G稳定秒评</option>
<option value="3">3G高效秒评</option>
<option value="4">触屏秒评</option>
<option value="5">PC秒评</option>
</select>
</div><br>
请输入评论内容，留空则使用默认评论<br><br>
<textarea name="pinglun" cols=30 rows=5>'.$sql['pinglun'].'</textarea><br><br>
<div class="login-btn-set"><div class="rem">同意规定</div> <input type="submit"  value=" " class="login-btn3">
</div></form>
<center><a href="set.php?qid='.$qid.'">返回设置中心</a></center>
</div>';
}
//秒评设置选项
if($_GET[changepl])
{
$changepl=$_GET['changepl'];
$pinglun=$_GET['pinglun'];
$xiugai_sql="update qqlist set pl='$changepl',pinglun='$pinglun' where qq=$qq";
if(mysql_query($xiugai_sql)){
echo '<div class="signup_container"><h1 class="signup_title">修改秒评开关</h1><br>秒评修改成功<br><br><center><a href="set.php?qid='.$qid.'">返回设置中心</a></center></div>';
exit();
}else{
echo '<div class="signup_container"><h1 class="signup_title">修改秒评开关</h1><br>秒评修改失败，请稍后重试<br><br><center><a href="set.php?qid='.$qid.'">返回设置中心</a></center></div>';
exit();
}
}
//自动发说说设置
if($act=='ss')
{

echo '<div class="signup_container">
<h1 class="signup_title">自动说说设置</h1>
<br>'.$sql['qq'].'说说设置界面
<div id="signup_forms" class="signup_forms clearfix">
<form class="signup_form_form" action="edit.php" method="get" >
<input type="hidden" name="qid" value="'.$qid.'">
<select name="changess" style="width:260px">
<option value="1">关闭自动说说</option>
<option value="2">开启自动文字说说（随机内容）</option>
<option value="3">开启自动图片说说（随机内容）</option>
</select>
</div><br>
请选择说说机型<br><br>
<select name="ssua" style="width:260px">
<option value="iphone 5s">iphone 5s</option>
<option value="iphone 6">iphone 6</option>
<option value="小米 3s">小米 3s</option>
<option value="小米 4">小米 4</option>
<option value="肾果">肾果</option>
<option value="古董版诺基亚">古董版诺基亚</option>
<option value="随机">各种手机型号随机使用</option>
</select><br><br>
自动发说说频率<br><br>
<select name="zdss" style="width:260px">
<option value="1">5分钟一次</option>
<option value="2">10分钟一次</option>
<option value="3">15分钟一次</option>
<option value="6">30分钟一次</option>
<option value="9">45分钟一次</option>
<option value="12">60分钟一次</option>
<option value="24">120分钟一次</option>
</select><br><br>
请输入说说尾巴，可留空<br><br>
<textarea name="ssweiba" cols=30 rows=5>'.$sql['sswb'].'</textarea><br><br>
<div class="login-btn-set"><div class="rem">同意规定</div> <input type="submit"  value=" " class="login-btn3">
</div></form>
<center><a href="set.php?qid='.$qid.'">返回设置中心</a></center>
</div>';
}
//自动发说说设置选项
if($_GET[changess])
{
$changess=$_GET['changess'];
$ssua=$_GET['ssua'];
$zdss=$_GET['zdss'];
$sswb=$_GET['ssweiba'];
$xiugai_sql="update qqlist set ss='$changess',ssua='$ssua',zdss='$zdss',sswb='$sswb' where qq=$qq";
if(mysql_query($xiugai_sql)){
echo '<div class="signup_container"><h1 class="signup_title">修改自动说说开关</h1><br>自动说说修改成功<br><br><center><a href="set.php?qid='.$qid.'">返回设置中心</a></center></div>';
exit();
}else{
echo '<div class="signup_container"><h1 class="signup_title">修改自动说说开关</h1><br>自动说说修改失败，请稍后重试<br><br><center><a href="set.php?qid='.$qid.'">返回设置中心</a></center></div>';
exit();
}
}
//挂q设置
if($act=='gq')
{
echo '<div class="signup_container">
<h1 class="signup_title">挂Q设置</h1>
<br>'.$sql['qq'].'挂Q设置界面
<div id="signup_forms" class="signup_forms clearfix">
<form class="signup_form_form" action="edit.php" method="get" >
<input type="hidden" name="qid" value="'.$qid.'">
<select name="changegq" style="width:260px">
<option value="1">关闭挂Q</option>
<option value="2">开启挂Q</option>
</select>
</div>
<div class="login-btn-set"><div class="rem">同意规定</div> <input type="submit"  value=" " class="login-btn3">
</div></form>
<center><a href="set.php?qid='.$qid.'">返回设置中心</a></center>
</div>';
}
//挂q设置选项
if($_GET[changegq])
{
$changegq=$_GET['changegq'];
$xiugai_sql="update qqlist set gq='$changegq' where qq=$qq";
if(mysql_query($xiugai_sql)){
echo '<div class="signup_container"><h1 class="signup_title">修改挂Q开关</h1><br>挂Q修改成功<br><br><center><a href="set.php?qid='.$qid.'">返回设置中心</a></center></div>';
exit();
}else{
echo '<div class="signup_container"><h1 class="signup_title">修改挂Q开关</h1><br>挂Q修改失败，请稍后重试<br><br><center><a href="set.php?qid='.$qid.'">返回设置中心</a></center></div>';
exit();
}
}


//签到设置
if($act=='qd')
{
echo '<div class="signup_container">
<h1 class="signup_title">每日签到设置</h1>
<br>'.$sql['qq'].'签到设置界面
<div id="signup_forms" class="signup_forms clearfix">
<form class="signup_form_form" action="edit.php" method="get" >
<input type="hidden" name="qid" value="'.$qid.'">
<select name="changeqd" style="width:260px">
<option value="1">关闭每日签到</option>
<option value="2">开启每日签到</option>
</select>
</div>
<div class="login-btn-set"><div class="rem">同意规定</div> <input type="submit"  value=" " class="login-btn3">
</div></form>
<center><a href="set.php?qid='.$qid.'">返回设置中心</a></center>
</div>';
}
//签到选项
if($_GET[changeqd])
{
$changeqd=$_GET['changeqd'];
$xiugai_sql="update qqlist set qd='$changeqd' where qq=$qq";
if(mysql_query($xiugai_sql)){
echo '<div class="signup_container"><h1 class="signup_title">修改每日签到开关</h1><br>每日签到修改成功<br><br><center><a href="set.php?qid='.$qid.'">返回设置中心</a></center></div>';
exit();
}else{
echo '<div class="signup_container"><h1 class="signup_title">修改每日签到开关</h1><br>每日签到修改失败，请稍后重试<br><br><center><a href="set.php?qid='.$qid.'">返回设置中心</a></center></div>';
exit();
}
}


//花藤设置
if($act=='ht')
{
echo '<div class="signup_container">
<h1 class="signup_title">花藤设置</h1>
<br>'.$sql['qq'].'花藤设置界面
<div id="signup_forms" class="signup_forms clearfix">
<form class="signup_form_form" action="edit.php" method="get" >
<input type="hidden" name="qid" value="'.$qid.'">
<select name="changeht" style="width:260px">
<option value="1">关闭花藤功能</option>
<option value="2">开启花藤自动浇花、修剪、日照、施肥</option>
</select>
</div>
<div class="login-btn-set"><div class="rem">同意规定</div> <input type="submit"  value=" " class="login-btn3">
</div></form>
<center><a href="set.php?qid='.$qid.'">返回设置中心</a></center>
</div>';
}
//花藤选项
if($_GET[changeht])
{
$changeht=$_GET['changeht'];
$xiugai_sql="update qqlist set ht='$changeht' where qq=$qq";
if(mysql_query($xiugai_sql)){
echo '<div class="signup_container"><h1 class="signup_title">修改花藤开关</h1><br>花藤修改成功<br><br><center><a href="set.php?qid='.$qid.'">返回设置中心</a></center></div>';
exit();
}else{
echo '<div class="signup_container"><h1 class="signup_title">修改花藤开关</h1><br>花藤修改失败，请稍后重试<br><br><center><a href="set.php?qid='.$qid.'">返回设置中心</a></center></div>';
exit();
}
}

//刷说说赞
if($act=='szan')
{
$timeout=date('Y-m-d',strtotime('+5 day'));
if($usersql[end]<$timeout){
	exit('对不起，你无权使用该功能！');
}
echo '<div class="signup_container">
<h1 class="signup_title">添加刷说说赞</h1>
<br>'.$sql['qq'].'添加刷说说赞';
if($_GET['do']=='do'){
	$uin=$_GET['uin'];
	$appid=$_GET['appid'];
	$curkey=$_GET['curkey'];
	$uinkey=$_GET['uinkey'];
	$query = mysql_query("SELECT * FROM qqlist WHERE sidzt=0");
	include_once "cron/qzone.class.php";
	while($row=mysql_fetch_array($query)){
		$qzone=new qzone($row[qq],$row['sid'],$row['skey']);
		$qzone->cplike($uin,$appid,$uinkey,$curkey);
		echo '<hr>'.implode(',',$qzone->msg).implode(',',$qzone->error);
	}
}elseif($_POST['do']=='add'){
	$uin=$_POST['uin'];
	$cellid=$_POST['cellid'];
	include_once "cron/qzone.class.php";
	$url="http://m.qzone.com/get_detail?appid=311&cellid={$cellid}&subid=&res_uin={$uin}&format=json";
	$cookie="sid=".$sql['sid'].";";
	$qzone=new qzone($sql[qq],$sql['sid'],$sql['skey']);
	$json=$qzone->get_curl($url,0,0,$cookie);
	$arr=json_decode($json,true);
	if($arr[code]==0){
		$appid=$arr['data']['cell_comm']['appid'];
		$curkey=$arr['data']['cell_comm']['curlikekey'];
		$uinkey=$arr['data']['cell_comm']['orglikekey'];
		$msg="<a href='?action=szan&do=do&qid={$qid}&uin={$uin}&appid={$appid}&curkey={$curkey}&uinkey={$uinkey}'>开始执行</a>，时间有点长，请慢慢等待！";
	}else{
		$msg=$arr[message];
	}
}
if($msg){
	echo'<hr><br><font color="red"><center>'.$msg.'</center></font>';
}
echo'<div id="signup_forms" class="signup_forms clearfix">
<form action="?action=szan&qid='.$qid.'" method="post" enctype="multipart/form-data">
<input type="hidden" name="do" value="add">
<input type="text" name="uin" placeholder="发布说说者的QQ号"><hr>
<input type="text" name="cellid" placeholder="说说cellid">
<hr>
PS:cellid值查看方法，进手机触屏班空间，点击你要刷赞的说说，查看网址：<br>
http://m.qzone.com/infocenter?g_ut=3&<br>g_f=6676#77041106/detail?appid=311&<br>cellid=d28d9704578b035515940600<br>&res_uin=77041106&<br>starttime=1426296099846<br><br>
d28d9704578b035515940600  这个24位数字字母就是cellid<br>
同一说说没必要重复执行，因为这是用本站的所有QQ为你刷赞，赞过一次了已经不能再赞了！
</div>
<div class="login-btn-set"><div class="rem">同意规定</div> <input type="submit"  value="" class="login-btn3">
</div></form>
<center><a href="set.php?qid='.$qid.'">返回设置中心</a></center>
</div>';
}

//删说说
if($act=='sss')
{
echo '<div class="signup_container">
<h1 class="signup_title">删说说设置</h1>
<br>'.$sql['qq'].'删说说设置界面
<div id="signup_forms" class="signup_forms clearfix">
<form class="signup_form_form" action="edit.php" method="get" >
<input type="hidden" name="qid" value="'.$qid.'">
<select name="changesss" style="width:260px">
<option value="1">关闭删说说</option>
<option value="2">开启删说说</option>
</select>
</div>
<div class="login-btn-set"><div class="rem">同意规定</div> <input type="submit"  value=" " class="login-btn3">
</div></form>
<center><a href="set.php?qid='.$qid.'">返回设置中心</a></center>
</div>';
}
//删说说设置选项
if($_GET[changesss])
{
$changesss=$_GET['changesss'];
$xiugai_sql="update qqlist set sss='$changesss' where qq=$qq";
if(mysql_query($xiugai_sql)){
echo '<div class="signup_container"><h1 class="signup_title">修改删说说开关</h1><br>秒赞修改成功<br><br><center><a href="set.php?qid='.$qid.'">返回设置中心</a></center></div>';
exit();
}else{
echo '<div class="signup_container"><h1 class="signup_title">修改删说说</h1><br>删说说修改失败，请稍后重试<br><br><center><a href="set.php?qid='.$qid.'">返回设置中心</a></center></div>';
exit();
}
}

//刷访问
if($act=='sfw')
{
echo '<div class="signup_container">
<h1 class="signup_title">刷访问设置</h1>
<br>'.$sql['qq'].'刷访问设置界面
<div id="signup_forms" class="signup_forms clearfix">
<form class="signup_form_form" action="edit.php" method="get" >
<input type="hidden" name="qid" value="'.$qid.'">
<select name="changesfw" style="width:260px">
<option value="1">关闭刷访问</option>
<option value="2">开启刷访问</option>
</select>
</div>
<div class="login-btn-set"><div class="rem">同意规定</div> <input type="submit"  value=" " class="login-btn3">
</div></form>
<center><a href="set.php?qid='.$qid.'">返回设置中心</a></center>
</div>';
}
//刷访问设置选项
if($_GET[changesfw])
{
$changesfw=$_GET['changesfw'];
$xiugai_sql="update qqlist set sfw='$changesfw' where qq=$qq";
if(mysql_query($xiugai_sql)){
echo '<div class="signup_container"><h1 class="signup_title">修改刷访问开关</h1><br>刷访问修改成功<br><br><center><a href="set.php?qid='.$qid.'">返回设置中心</a></center></div>';
exit();
}else{
echo '<div class="signup_container"><h1 class="signup_title">修改刷访问</h1><br>刷访问修改失败，请稍后重试<br><br><center><a href="set.php?qid='.$qid.'">返回设置中心</a></center></div>';
exit();
}
}

//刷留言
if($act=='sly')
{
echo '<div class="signup_container">
<h1 class="signup_title">刷留言设置</h1>
<br>'.$sql['qq'].'刷留言设置界面
<div id="signup_forms" class="signup_forms clearfix">
<form class="signup_form_form" action="edit.php" method="get" >
<input type="hidden" name="qid" value="'.$qid.'">
<select name="changesly" style="width:260px">
<option value="1">关闭刷留言</option>
<option value="2">开启刷留言</option>
</select>
</div>
<div class="login-btn-set"><div class="rem">同意规定</div> <input type="submit"  value=" " class="login-btn3">
</div></form>
<center><a href="set.php?qid='.$qid.'">返回设置中心</a></center>
</div>';
}
//刷留言设置选项
if($_GET[changesly])
{
$changesly=$_GET['changesly'];
$xiugai_sql="update qqlist set sly='$changesly' where qq=$qq";
if(mysql_query($xiugai_sql)){
echo '<div class="signup_container"><h1 class="signup_title">修改刷留言开关</h1><br>刷留言修改成功<br><br><center><a href="set.php?qid='.$qid.'">返回设置中心</a></center></div>';
exit();
}else{
echo '<div class="signup_container"><h1 class="signup_title">修改刷留言</h1><br>刷留言修改失败，请稍后重试<br><br><center><a href="set.php?qid='.$qid.'">返回设置中心</a></center></div>';
exit();
}
}


?>